Skip to content

Conversation

@pcarleton
Copy link
Member

Summary

Adds a step-up authentication scenario to test servers' handling of scope escalation via 403 insufficient_scope.

What's New

New Scenario: server-auth/step-up-auth

Tests the complete step-up authentication flow:

  1. Authenticate with basic scope
  2. Call tools/list (should succeed)
  3. Call privileged tool (should get 403 insufficient_scope)
  4. Re-authenticate with elevated scope (admin)
  5. Call privileged tool again (should succeed)

Conformance Checks

  • step-up-403-response - Server returns 403 with insufficient_scope error
  • step-up-scope-in-header - WWW-Authenticate includes required scope
  • step-up-resource-metadata - WWW-Authenticate includes resource_metadata
  • step-up-re-auth - Client re-authenticated for elevated scope
  • step-up-success-after-escalation - Request succeeds after scope escalation

Spec References

  • RFC 6750 Section 3 (insufficient_scope error)
  • RFC 6750 Section 3.1 (error handling)
  • MCP Authorization Specification

Related PRs

- New StepUpAuthScenario tests 403 insufficient_scope handling
- Verifies server returns proper WWW-Authenticate with scope/resource_metadata
- Verifies client re-authenticates with elevated scope
- Tests successful request after scope escalation
@pkg-pr-new
Copy link

pkg-pr-new bot commented Jan 14, 2026

Open in StackBlitz

npx https://pkg.pr.new/modelcontextprotocol/conformance/@modelcontextprotocol/conformance@106

commit: b355551

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants